/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* 摄像头容器 */
.camera-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    height: 480px;
    background-color: #eee;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

#videoElement {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 控制按钮 */
.controls {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.control-btn {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.control-btn:hover {
    background-color: #2980b9;
}

.control-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* 加载指示器 */
.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none;
} 